from langchain_openai import OpenAI, ChatOpenAI

from dotenv import load_dotenv
load_dotenv()

#初始化 OpenAIEmbeddings()
embeddings = OpenAIEmbeddings(model = "text-embedding-3-large")
text = "大模型"

#嵌入文档
doc_result = embeddings.embed_documents(text)
print(doc_result[0][:5])

#嵌入查询
query_result = embeddings.embed_query(text)
print(query_result[:5])


print(res)